#include<stdio.h>
int main() 
{
	int sum = 0;
	int a, b, c;
	scanf_s("%d", &sum);
	a = sum / 3600;
	b = sum % 3600;
	c = sum % 3600 / 60;
	printf("%d  %d  %d", a, b, c);
	return 0;

}